<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@include file="/commons/header.jsp" %>

<div style="margin-left:210px;margin-top:65px;padding:10px 5px 0 5px;">

    <div style="line-height:26px;height:26px;margin-bottom:10px;">
        <h1 style="float:left;font-size:26px;">发送通知</h1>

        <span class="layui-breadcrumb" style="float:right;font-size:12px;">
                <a href="#">首页</a>
                <a><cite>发送通知</cite></a>
            </span>
    </div>


    <!--内容-----------------------------开始-------------------------------------------------->
    <div style="clear:both;margin-top:20px;">

    </div>
    <h2>发送通知</h2>


    <form class="layui-form" action="">
        <div class="layui-form-item">
            <label class="layui-form-label">推送内容</label>
            <div class="layui-input-block">
               <textarea class="layui-textarea" style="width: 70%;" id="content"></textarea>
            </div>
        </div>
        <div class="layui-form-item" style="width:100%;padding-left:28px;">
            <div class="layui-input-inline" style="text-align:left;width:100%">
                <button class="layui-btn" lay-submit
                        lay-filter="formDemo" style="margin-left:60px;">推送
                </button>
            </div>
        </div>

    </form>


    <script src="${pageContext.request.contextPath}/lib/layui.all.js"/>
    <script src="${pageContext.request.contextPath}/lib/lay/modules/form.js"></script>


    <script>
        layui.use('form', function () {
            var form = layui.form;

            //监听提交
            form.on('submit(formDemo)', function (data) {
                var field = data.field;

                var content = $("#content").val();

                $.post("${pageContext.request.contextPath}/manager/CircleServlet?op=push", {
                    "content": content
                }, function (datas) {
                    layer.msg(datas["error"]);

                });
                return false;
            });
        });


    </script>

<%@include file="/commons/footer.jsp" %>